home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / sound / kidplay.zip / README.TXT < prev   
Text File  |  1992-11-30  |  9KB  |  191 lines

  1. PLAYWAY and MIDPLAY2 (by Bruce Cichowlas 71760,554) November 30, 1992
  2.  
  3. DISCLAIMER:
  4.  
  5. BOTH OF THESE PROGRAMS ARE QUICKIES WRITTEN TO AMUSE MY 1,4, AND 6 YEAR OLDS AND
  6. ARE THEREFORE NOT REPRESENTATIVE OF THE PROFESSIONAL QUALITY CODE (WHICH I PRODUCE
  7. FOR A LIVING).  THESE WERE UPLOADED AT THE REQUEST OF SEVERAL INDIVIDUALS IN THE
  8. FORUM.
  9.  
  10. PURPOSE AND SUMMARY (for both programs):
  11.  
  12. Kids like to hear sounds, particularly if they can control them.  In these activities,
  13. they get to use the mouse to select and start up sounds (.WAV or .MID).  If they get
  14. bored with one, another will get started soon after they press another button.
  15.  
  16. Each program displays the name of the file it is playing.  To stop either, you
  17. must double click on the close box (or use some other standard window closing method).
  18.  
  19. In each case, as the sound plays, something visual happens on the screen to help
  20. keep the kid's attention and to show which button they pressed last.
  21.  
  22. Be sure to tell your kids that some of the sounds will take awhile to start (because they
  23. are long files).  It is also normal for the current sound to continue, even
  24. though you have closed the program.  You may consider this a feature or a bug.
  25.  
  26. PURPOSE AND SUMMARY (specific to PLAYWAV):
  27.  
  28. When a button is pressed, a random icon appears on the button just pushed.  (See SETUP)
  29. Also, the icon's name appears in the box at the lower right.  You can tell which
  30. sounds have been played because there are icons in the boxes.
  31.  
  32. PURPOSE AND SUMMARY (specific to MIDPLAY2):
  33.  
  34. At the beginning, each box is a shade of grey.  When each box is pressed, it turns
  35. a series of different random colors as the MID file is played.  You can tell which
  36. boxes have been used because they are not shades of grey (for the most part).
  37.  
  38. There are two buttons at the lower right in MIDPLAY2.  The left one is a bank select
  39. and turns GREEN, BLUE, YELLOW or PINK as it is pressed, if you have more than 110 .MID files.
  40. This will select which bank is in use.  The right one is for a kind of random juke-box
  41. mode.  If it is RED, a new .MID file will automatically be selected after the current
  42. one finishes.  (It is GREY when inactive.)
  43.  
  44. SETUP (specific to PLAYWAV):
  45.  
  46. You need VBRUN100.DLL since this is written in Visual Basic.  If you don't have this,
  47. you can get it from the Microsoft Forums.  You need to create a file
  48. called WAVS.DAT in the "current directory".  This file should have one .WAV file
  49. per line.  Here is an excerpt from mine:
  50.  
  51. f:\midwav\CHORD.WAV
  52. f:\midwav\CHIMES.WAV
  53. f:\midwav\TADA.WAV
  54. f:\midwav\DING.WAV
  55. f:\midwav\BELLS.WAV
  56. f:\midwav\BUMMER.WAV
  57. f:\midwav\CLAP.WAV
  58. f:\midwav\CLOCK.WAV
  59. f:\midwav\BLOCKS.WAV
  60. f:\midwav\TITLE.WAV
  61. f:\midwav\ANNA.WAV
  62. f:\midwav\LATNGUIT.WAV
  63. f:\midwav\CBJAZZ.WAV
  64. f:\midwav\CBLATIN.WAV
  65. f:\midwav\CBROCK.WAV
  66.  
  67. I happen to have them all in one directory, but this need not be the case.  Be careful
  68. not to have blank lines at the beginning or end, or spaces in the file.  If there
  69. are more than 114 entries in this file, only the first 114 will be used.  If there are less,
  70. they will be repeated as necessary for the 114 sound buttons on the screen.
  71.  
  72. You also need a file ICONS.DAT which is set up just like the preceeding one, but has
  73. the names of icons.  Not more than the first 500 icons will be used from this file (see above).
  74. You need not have this many.
  75.  
  76. YOU MAY FIND, AS I DID, THAT SOME ICONS WILL NOT WORK WITH THIS PROGRAM.  I didn't
  77. take the time to figure out why, though I suspect it is either a bug in Visual Basic or
  78. depends on the display format of the .ICON file.  The ICON's that came with Visual Basic
  79. worked fine for the purposes of this program.  (So did most others.)  If you seem to
  80. be having problems, put just a few names in the file and see if this helps.  To test whether
  81. a particular ICON is a problem, you could put just that one ICON name in the ICONS.DAT
  82. file, and this program would try to use it every time, allowing you to quickly determine
  83. whether there is a problem with that particular icon.
  84.  
  85. About 95% of my icons worked without problems.  If someone figures out what is going on
  86. here, I'd appreciate a message.
  87.  
  88. SETUP (specific to MIDPLAY2):
  89.  
  90. Besides VBRUN100.DLL (see above), you needs to make a file called MIDS.DAT in the
  91. current directory.  Follow the directions about WAVS.DAT above, except that this
  92. file will contain the names of your .MID files.  Here's an excerpt from mine:
  93.  
  94. f:\midwav\THOMAS.MID
  95. f:\midwav\SING.MID
  96. f:\midwav\MTNKING.MID
  97.  
  98. As noted above, these .MID files need not all be from the same directory.  No more than
  99. 440 .MID filenames will be used from this file.  If you have more than 110 names
  100. in this file, they appear as multiple banks (see description above).
  101.  
  102. Before attempting to get this program to play .MID files, make sure your system
  103. is set up correctly.  One easy way (under Windows 3.1) is to double-click on the .MID
  104. file names while in File Manager and make sure that the media player plays them back
  105. correctly and without comment.  If you don't hear them, or they seem voiced wrong, you
  106. might try playing with the "MIDI Mapper" in the Control Panel (see your Windows manual).
  107.  
  108. You may also find some of your .MID files that pollute the waters for
  109. succeeding .MID files, resulting
  110. in wrong patches, etc.  Probably there is some kind of reset I could
  111. add to the program to prevent this.  If this is a problem for you,
  112. just remove the names of the offending files from the list of .MID files.
  113.  
  114. TECHNICAL NOTES:
  115.  
  116. The source is included so you can modify these as needed.  If you do something nifty, my
  117. kids and I would sure like a copy.
  118.  
  119. These programs also illustrate the simplest ways I know to play sounds in Visual Basic 1.00 .
  120.  
  121. PLEASE NOTE THAT THE INSTRUCTIONS FOR PLAYING .WAV FILES THAT APPEAR IN THE MICROSOFT
  122. KNOWLEDGE BASE ON COMPUSERVE HAVE SOME SUBTLE ERRORS.  (I learned this the hard way.)
  123.  
  124. In particular, their example says "SND_ASYNC And SND_NODEFAULT" when it should say 
  125. "SND_ASYNC Or SND_NODEFAULT".  Without this correction, you won't be able to
  126. interrupt the sounds.  (I know some programmers fell for this one.  You'll see this
  127. mistake copied in many Visual Basic programs for .WAV files.)
  128.  
  129. The other mistake in this item in the Microsoft Knowledge Base is that it says
  130.  
  131. Declare Function sndPlaySound Lib "MMSTSTEM.DLL"  etc.
  132.  
  133. but it should say
  134.  
  135. Declare Function sndPlaySound Lib "MMSYSTEM.DLL"  etc.
  136.  
  137. Small differences, but they can take awhile to track down, particularly if you are not
  138. very familiar with BASIC or the Multimedia operations.
  139.  
  140. CONFIGURATION:
  141.  
  142. Since these were originally written for my own kids using these on my own systems, I
  143. may have inadvertently introduced some system-specific stuff that you may have to change.
  144. On the other hand, since I write software for resale for a living, I mostly avoid
  145. these sort of problems instinctively.
  146.  
  147. The smallest configuration we use is a 33 Mhz 386 with 12 MB running Windows 3.1 with
  148. a version 1.5 SoundBlaster.  This software has also been tested on a system
  149. with a MPU-401/MT-32 for the MIDI and a Media Vision card for the .WAV stuff.  Probably
  150. it will work for you, subject to the usual possible problems with .MID mapping.  (Make sure
  151. you can play your .MID files OK through the usual Windows 3.1 facilities before expecting
  152. them to    work with this program.)  Only the "Enhanced" mode of Windows was tested.  Both
  153. a standard VGA and a 1024x768 VGA have been used, each with 256 colors.  The hatching
  154. in the grey and color patterns is normal.  This is just the way Visual Basic does things,
  155. even if you have 256 colors.  (Probably you could play with the color functions in
  156. Visual Basic and do better.)
  157.  
  158. Because of how Visual Basic implements "control arrays", you will find that
  159. you can't run much in the way of other applications alongside of these, even if you have
  160. lots of RAM.  (I suspect
  161. if you re-implemented the button/picture control arrays as a single control with
  162. multiple sensitive areas, you would avoid this limitation.  I may eventually
  163. do this myself to support more buttons at a time.)
  164.  
  165. OWNERSHIP, PLEA, ETC.:
  166.  
  167. I wrote these myself, and they are public domain as far as I am concerned.  My kids
  168. and I would appreciate a copy of any derivative works, as well as any comments, good
  169. or bad.
  170.  
  171. Any kind of response is appreciated.  Your feedback gives me ideas for
  172. new programs.  Criticisms are interesting, too, and help me improve my
  173. skills as a commercial software developer.
  174.  
  175. If, as a part of the ShareWare principle, you'd like to do something nice in return,
  176. do something special for your kids or someone else's to give them encouragement in
  177. their own special interests.
  178.  
  179. For me, job leads are always welcome, particularly in the current economy.  I do lots
  180. of work as an independent consultant in C or C++ under Windows, including some of the highly
  181. technical aspects.  I have a resume available on request.
  182.  
  183. Hello and enjoy!
  184.  
  185. Bruce Cichowlas
  186. 135 Everett Street
  187. Natick, MA 01760
  188. (508)-655-0103
  189. Compuserve [71760,554]
  190.  
  191.